home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11636 < prev    next >
Encoding:
Text File  |  1996-08-05  |  895 b   |  37 lines

  1. Path: news.uni-c.dk!news
  2. From: maspsr@dou.ou.dk (peter S°rensen)
  3. Newsgroups: comp.lang.c
  4. Subject: BAD FILE NUMBER
  5. Date: 25 Mar 1996 14:14:36 GMT
  6. Organization: DOU
  7. Message-ID: <4j69oc$3pb@news.uni-c.dk>
  8. NNTP-Posting-Host: peter.dou.dk
  9. Mime-Version: 1.0
  10. X-Newsreader: WinVN 0.93.11
  11.  
  12. Hi,
  13.  
  14. I have a very annoying problem in a DLL written in C. 
  15.  
  16. The functions in the dll is to be used from paradox for windows. 
  17.  
  18. One of the functions will open a file and read som ascii information
  19. into memory. In some cases the open succeed but I get a file pointer
  20. back whichs is BAD. I don't get an error in the open. I open with:
  21.  
  22.     if ( ( fp = fopen("somefile","r")) == NULL)
  23.         ..... give an errormessage
  24.     
  25.  
  26. When I afterwards try to read from this pointer I get:
  27.  
  28.     BAD FILE NUMBER
  29.  
  30. Can someone give me in hint to solve this problem????
  31.  
  32.  
  33. Regards
  34.  
  35. Peter Sorensen/University of Odense,dk/e-mail:maspsr@dou.ou.dk
  36.  
  37.